//
// REM
// ===
//


// Default Variables
$base--font-size ?= 16px

rem($value, $base = $base--font-size)
  $max = length($value)

  $remValues = ()
  for $i in (0...$max)
    push($remValues, _convert-to-rem( $value[$i], $base ))

  return $remValues

_convert-to-rem($px, $base)
  if $is-ie && $is-ie--version <= 8
    ($px)px
  else if (typeof($px) == 'unit')
    if ((unit($px) == '' || unit($px) == 'px') && ($px != 0))
      return (round($px / $base, 3))rem
    else
      return 0
